﻿using System;

namespace FlashPay.Util.StatusCode
{
    public class StatusCodeFactoryCN : StatusCodeFactory
    {
        protected override string GetMessage(StatusCode status)
        {
            switch (status)
            {
                case StatusCode.COMPANY_ADD_CANNOT_FIND_DATA:
                case StatusCode.COMPANY_EDIT_CANNOT_FIND_DATA:
                case StatusCode.COMPANY_DELETE_CANNOT_FIND_DATA:
                case StatusCode.COMPANY_CHANGE_COMPANY_MENU_TYPE_CANNOT_FIND_DATA:
                case StatusCode.COMPANY_CHANGE_COMPANY_STATUS_CANNOT_FIND_DATA:
                case StatusCode.ORDER_EDIT_CANNOT_FIND_DATA:
                case StatusCode.ORDER_EDIT_RECEIPT_DATE_CANNOT_FIND_DATA:
                case StatusCode.ORDER_EDIT_PAY_DATE_CANNOT_FIND_DATA:
                case StatusCode.ORDER_DELETE_CANNOT_FIND_DATA:
                case StatusCode.ORDER_PASS_DEPOSIT_CANNOT_FIND_DATA:
                case StatusCode.ORDER_PASS_PAY_CANNOT_FIND_DATA:
                case StatusCode.ORDER_DETAIL_ADD_CANNOT_FIND_DATA:
                case StatusCode.ORDER_DETAIL_EDIT_CANNOT_FIND_DATA:
                case StatusCode.ORDER_DETAIL_EDIT_ACTUAL_COUNT_AND_UNIT_PRICE_CANNOT_FIND_DATA:
                case StatusCode.ORDER_DETAIL_DELETE_CANNOT_FIND_DATA:
                case StatusCode.BANK_INFO_EDIT_CANNOT_FIND_DATA:
                case StatusCode.SYS_CONFIG_EDIT_CANNOT_FIND_DATA:
                    return "未找到该笔资料";

                case StatusCode.COMPANY_DELETE_EXIST_ROLE_DATA:
                    return "该公司存在角色资料，无法删除";

                case StatusCode.COMPANY_DELETE_EXIST_USER_DATA:
                    return "该公司存在用户资料，无法删除";

                case StatusCode.ORDER_EDIT_NO_DATA_OWNERSHIP:
                case StatusCode.ORDER_EDIT_RECEIPT_DATE_NO_DATA_OWNERSHIP:
                case StatusCode.ORDER_EDIT_PAY_DATE_NO_DATA_OWNERSHIP:
                case StatusCode.ORDER_DELETE_NO_DATA_OWNERSHIP:
                case StatusCode.ORDER_PASS_DEPOSIT_NO_DATA_OWNERSHIP:
                case StatusCode.ORDER_PASS_PAY_NO_DATA_OWNERSHIP:
                case StatusCode.ORDER_DETAIL_ADD_NO_DATA_OWNERSHIP:
                case StatusCode.ORDER_DETAIL_EDIT_NO_DATA_OWNERSHIP:
                case StatusCode.ORDER_DETAIL_EDIT_ACTUAL_COUNT_AND_UNIT_PRICE_NO_DATA_OWNERSHIP:
                case StatusCode.ORDER_DETAIL_DELETE_NO_DATA_OWNERSHIP:
                    return "无资料拥有权";

                case StatusCode.ORDER_EDIT_DEPOSIT_PASSED:
                case StatusCode.ORDER_DELETE_DEPOSIT_PASSED:
                case StatusCode.ORDER_PASS_DEPOSIT_DEPOSIT_PASSED:
                case StatusCode.ORDER_DETAIL_EDIT_DEPOSIT_PASSED:
                    return "押金已审核";

                case StatusCode.ORDER_PASS_PAY_DEPOSIT_NO_PASS:
                case StatusCode.ORDER_PASS_RECEIPT_DEPOSIT_NO_PASS:
                    return "押金未审核";

                case StatusCode.ORDER_EDIT_PAY_PASSED:
                case StatusCode.ORDER_EDIT_RECEIPT_DATE_PAY_PASSED:
                case StatusCode.ORDER_EDIT_PAY_DATE_PAY_PASSED:
                case StatusCode.ORDER_PASS_PAY_PAY_PASSED:
                case StatusCode.ORDER_DETAIL_EDIT_PAY_PASSED:
                case StatusCode.ORDER_DETAIL_EDIT_ACTUAL_COUNT_AND_UNIT_PRICE_PAY_PASSED:
                case StatusCode.ORDER_DETAIL_DELETE_PAY_PASSED:
                    return "付款已审核";

                case StatusCode.ORDER_PASS_RECEIPT_RECEIPT_PASSED:
                    return "收货已审核";

                case StatusCode.ORDER_PASS_PAY_RECEIPT_NO_PASS:
                    return "收货未审核";

                case StatusCode.ORDER_PASS_PAY_BANK_CARD_DATA_NOT_MATCH:
                    return "未授权银行卡数量与订单数量不符合";

                case StatusCode.ORDER_PASS_DEPOSIT_NO_SUB_ORDER:
                    return "无子订单";

                case StatusCode.ORDER_DETAIL_ADD_ORDER_HAS_BEEN_COMPLETED:
                    return "订单已完成";

                case StatusCode.COMPANY_EDIT_EXIST_NAME:
                case StatusCode.COMPANY_ADD_EXIST_NAME:
                    return "名称已重复";

                case StatusCode.BANK_INFO_ADD_EXIST_DATA:
                case StatusCode.SYS_CONFIG_ADD_EXIST_DATA:
                    return "資料已存在";

                case StatusCode.COMPANY_ADD_NAME_TOO_LONG:
                case StatusCode.COMPANY_EDIT_NAME_TOO_LONG:
                    return "长度不合法";

                case StatusCode.ILLEGAL_REQUEST:
                    return "非法请求";

                case StatusCode.SYSTEM_ERROR:
                    return "系统出错";

                default:
                    throw new Exception("The status code is no definition.");
            }
        }
    }
}